Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix achievements API version number. #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eldritch-elbow
Copy link

Calling achievements on an app object is returning an error. This fixes the problem by updating the version number of the API. Oddly, a direct browser-based call with “v2” in the URL still works, but the python library invocation isn’t happy.

I may come across other examples as I go, I can add to this PR if need be. Nice library BTW, thanks.

Oddly, a direct call with “v2” in the URL still works, but the python
library invocation isn’t happy.
@smiley
Copy link
Owner

smiley commented May 25, 2016

Huh, weird. The server originally didn't mind and some examples used the v000x syntax, while others used vx. (Any amount of zeroes worked)

Maybe the server-side implementation changed and broke this.

@eldritch-elbow
Copy link
Author

Actually it may not be that simple - I'm now hitting an APIBadCall error with a different game, with no clear reason why - below is the output of my program.

GET 'http://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v2/' with '{'steamid': 76561197970347865, 'format': 'json', 'key': '1DFEE0F6034695D0833027EAC609F84F', 'appid': 320}'
Traceback (most recent call last):
  File "./extract.py", line 18, in <module>
    for achievement in game.achievements:
  File "/Users/jsiddle/workspaces/my_projects/steam-recs/lib/python2.7/site-packages/steamapi-0.1-py2.7.egg/steamapi/decorators.py", line 71, in __get__
    value = self.fget(inst)
  File "/Users/jsiddle/workspaces/my_projects/steam-recs/lib/python2.7/site-packages/steamapi-0.1-py2.7.egg/steamapi/app.py", line 66, in achievements
    steamid=userid)
  File "/Users/jsiddle/workspaces/my_projects/steam-recs/lib/python2.7/site-packages/steamapi-0.1-py2.7.egg/steamapi/core.py", line 440, in call
    errors.check(response)
  File "/Users/jsiddle/workspaces/my_projects/steam-recs/lib/python2.7/site-packages/steamapi-0.1-py2.7.egg/steamapi/errors.py", line 110, in check
    raise APIBadCall()
steamapi.errors.APIBadCall

I've installed the library locally, and I'm debugging in my local version...

@belak
Copy link

belak commented Jun 9, 2016

I've actually been seeing the opposite. Some of the calls made in user.py which have multiple 0s seem to error with bad request. When you remove the extra 0s, it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants